package Square;
import java.util.List;

import be.kuleuven.cs.som.annotate.Basic;

public interface Teleporter {
	
	/**
	 * Method that adds a destination to the destinations' array
	 * 
	 * @param 		square
	 * 				Square that is going to be added to the destinations' array.
	 * 
	 * @post		The square is added as destination for this teleporting square.
	 * 				| getAllDestinations().contains(square) == true
	 */
	void addDestination(DefaultSquare square);
	
	/**
	 * Returns all the possible teleporting destinations of the teleporting square
	 * 
	 */
	@Basic
	List<DefaultSquare> getAllDestinations();
	
	/**
	 * Method that removes a certain square from the teleporters' destination
	 * @param	square
	 * 			The destination to remove
	 * @post	The square will be removed from this teleporter's destinations
	 * 			| getAllDestinations().contains(square) == false
	 */
	void removeDestination(DefaultSquare square);
	
	/**
	 * Method that returns the amount of destinations the square can teleport to.
	 * 
	 * @return		Returns the amount of destinations
	 */
	long getAmountOfDestinations();
	
	/**
	 * Method that picks a random square from the destinations array.
	 * 
	 * @return		Returns a random square from the destinations' array.
	 * 				
	 */
	DefaultSquare pickTeleportationSquare();
	
	/**
	 * Method that checks if the teleportingsquare can teleport to the given square
	 * 
	 * @param 		square
	 * 				Square that is checked in the destinations array
	 * 
	 * @return		Returns true if and only if the teleportingsquare can teleport to the square
	 */
	boolean canTeleportTo(DefaultSquare square);
	
	/**
	 * Method that checks if the destinationSquare is a valid destination for the teleporter
	 * 
	 * @param 		square
	 * 				The square that needs to be checked
	 * 
	 * @return		Returns true if and only if the square is a valid destination, false in other cases
	 * 
	 */
	boolean isValidDestination(DefaultSquare square);
	
	
}